﻿using System;
using FluentNHibernate.Conventions;

namespace BoneSystem.Models
{
    public class CadastroRestModel
    {
        public Type ClassType { get; set; }
        public string FormName { get; set; }
        public string DialogName { get; set; }
        public string DialogTitle { get; set; }
        public string ControllerName { get; set; }
        public string Area { get; set; }
        public string UrlNew
        {
            get
            {
                if (Area.IsNotEmpty())
                {
                    return "/" + Area + "/" + ControllerName + "/New";
                }
                return "/" + ControllerName + "/New";
            }
        }

        public string UrlUpdate
        {
            get
            {
                if (Area.IsNotEmpty())
                {
                    return "/" + Area + "/" + ControllerName + "/Index";
                }
                return "/" + ControllerName + "/Index";
            }
        }

    }
}